package com.sgt.frp.config;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@AllArgsConstructor
@NoArgsConstructor
@Data
public class GlobalResponse<T> {
    private int code;
    private String msg;
    private T data;
    public GlobalResponse success(String msg,T dada){
        this.code=0;
        this.msg=msg;
        this.data=dada;
        return this;
    }

    public GlobalResponse fail(String msg){
        this.code=1;
        this.msg=msg;
        return this;
    }}
